package com.javacode2018.demo4;

import com.javacode2018.demo1.UserService1;
import org.junit.Test;
import org.springframework.core.annotation.AnnotatedElementUtils;
import org.springframework.transaction.annotation.Transactional;

public class Demo4Test {
    @Test
    public void test1() throws NoSuchMethodException {
        System.out.println(AnnotatedElementUtils.findMergedAnnotationAttributes(
                C1.class, Transactional.class, false, false));
        System.out.println(AnnotatedElementUtils.findMergedAnnotationAttributes(
                C1.class.getDeclaredMethod("m1"), Transactional.class, false, false));

    }
}
